package cloud.api.service.ServiceImpl;

import cloud.api.mapper.AppDao;
import cloud.api.model.Apple;
import cloud.api.service.IAppleService;
import cloud.common.util.ParameterMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AppleService implements IAppleService {
    @Autowired
    AppDao appDao;


    @Override
    public List<Apple> getAllApple() {
        return appDao.getAllApple();
    }

    @Override
    public List<Apple> getAppleById( int id) {
        return appDao.getAppleById(id);
    }

    @Override
    public void saveApple(ParameterMap pm) {
        appDao.saveApple(pm);
    }

    @Override
    public void delApple(String id) {
        appDao.delApple(id);
    }

    @Override
    public void editApple(ParameterMap pm) {
        appDao.editApple(pm);


    }
}
